#ifndef __CTWEEN_H__
#define __CTWEEN_H__

//
// Reference: http://www.greensock.com
//

#include <math.h>

#define CALLBACKTYPE				stdcall
#define PI									(3.1415926)
#define HALF_PI     					(PI * 0.5)
#define VALUE_FICTION               (8)

typedef Int32 int;
typedef Int64 long long int;
typedef Millisecond32 int;

// The style of a animation.
enum AnimationStyle {
	AnimationStyle_Linear			= 0x00, /** < t */
	AnimationStyle_Quadratic		= 0x01, /** < t^2 */
	AnimationStyle_Cubic			= 0x02, /** < t^3 */
	AnimationStyle_Quartic      	= 0x03, /** < t^4 */
	AnimationStyle_Quintic      	= 0x04, /** < t^5 */
	AnimationStyle_Sinusoidal   	= 0x05, /** < sinc(4) */
	AnimationStyle_Exponential  = 0x06, /** < 2^t */
	AnimationStyle_Circular     	= 0x07, /** < sqrt(1-t^2)*/
	AnimationStyle_Elastic      	= 0x08, /** < */
	AnimationStyle_Back         	= 0x09, /** < (s+1)*t^3 - s*t^2 */
	AnimationStyle_Bounce       	= 0x0a, /** < */
}

enum EaseType {
	EaseType_In,
	EaseType_Out,
	EaseType_InOut,
}

Int32 CALLBACKTYPE GetLinearValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetQuadraticValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetCubicValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetQuarticValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetQuinticValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetSinusoidalValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetExponentialValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetCircularValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetElasticValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetBackValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

Int32 CALLBACKTYPE GetBounceValue(
    /* [in] */ Int32 fromValue,
    /* [in] */ Int32 toValue,
    /* [in] */ Millisecond32 elaspedTime,
    /* [in] */ Millisecond32 durationTime,
    /* [in] */ EaseType easeType);

#endif // __CTWEEN_H__